/**
 * Created by V-XiongXiang on 2017/6/30.
 */
import {BaseApiMethod,BaseService} from './business.service';

class ApiMethod extends BaseApiMethod{

    // 获取字典集合
    getGlobalSettingList(data){
        return this.post("GET_GLOBALSETTING_LIST",data);
    }

    // 根据globalId 获取对象
    getGlobalSettingMappingById(data){
        return this.post("GET_GLOBALSETTING_LIST",data);
    }

    // 更新Global 对象
    modifyGlobalSetting(data){
        return this.post("MODIFY_GLOBALSETTING_DATA",data);
    }
}

class GlobalSettingService extends BaseService{
    constructor(UtilService){
        super();
        this.api = new ApiMethod(UtilService);
    }

    getGlobalSettingList(data){
        return this.api.getGlobalSettingList(data);
    }

    getGlobalSettingMappingById(data){
        return this.api.getGlobalSettingMappingById(data);
    }

    modifyGlobalSetting(data){
        return this.api.modifyGlobalSetting(data);
    }
}

angular.module("biz-services").factory('GlobalSettingService',['UtilsService',function(UtilsService){
    return new GlobalSettingService(UtilsService);
}])
